/*
 * @Author: yxw
 * @Date: 2019-3-15 15:41:17
 * @Last Modified by: yxw
 * @Last Modified time: 2019-3-15 17:19:17
 * @Description: 消息管理相关api
 */

import request from '@/router/axios'
import { messageUrls } from '@/const/apiUrl'
/**
 * 获取话题消息
 * @param {*} query
 */
export function getTopicPage (query) {
  return request({
    url: messageUrls.topicPage,
    method: 'get',
    params: query
  })
}

/**
 * 获取话题详情
 * @param topicId
 */
export function topicDetail (topicId) {
  return request({
    url: messageUrls.topicById + topicId,
    method: 'get'
  })
}

/**
 * 话题信息
 * @param topicId
 */
export function messagePage (query) {
  return request({
    url: messageUrls.messagePage,
    method: 'get',
    params: query
  })
}
/**
 * 获取话题详情
 * @param topicId
 */
export function topicMessage (obj) {
  return request({
    url: messageUrls.topicMessage,
    method: 'post',
    data: obj
  })
}

/**
 * 获取话题对应的规划信息
 * @param topicId
 */
export function registerinfoBytopic (topicId) {
  return request({
    url: messageUrls.registerinfoBytopic + topicId,
    method: 'get'
  })
}

/**
 * 获取话题对应的规划信息
 */
export function rollData () {
  return request({
    url: messageUrls.rollData,
    method: 'get'
  })
}


/**
 * 导出会商反馈列表
 * @param {*}
 * @param {*}
 */
export function exportTopicData (query) {
  return request({
    url: messageUrls.exportTopicData,
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

/**
 * 导出会商反馈列表excel
 * @param {*}
 * @param {*}
 */
export function exportTopicDataExcel (query) {
  return request({
    url: messageUrls.exportTopicDataExcel,
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

